<% destroy_params ||= {} %>

<section class="contact" id="<%= dom_id contact %>">
  <div class="avatar">
    <%= link_to(image_tag(contact.receiver.logo.url(:small)), contact.receiver_subject) %>
  </div>

  <div class="data">
    <div class="name">
      <%= link_to(truncate_name(contact.receiver_subject.name), contact.receiver_subject)%>
    </div>

    <div class="info">
      <%= contact_count(contact.receiver) %>
    </div>
  </div>
  <div class="add">
    <%= contact_button(contact) %>
  </div>
  <div class="x">
        <%= link_to 'X', contact_path(contact, destroy_params), method: :delete, remote: true, confirm: t('contact.confirm_delete') %>
      </div>
</section>


